package ${moduleName}.entity.po;

import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import java.security.Timestamp;
import javax.persistence.Table;
import java.util.Date;

/**
* ${tableInfo.simpleRemark}
* @author auto
* @version 1.0.0 ${today} ${currentTime}
*/
@Data
@Table(name = "${tableInfo.originalTableName}")
public class ${tableInfo.firstUpperCase}Entity implements java.io.Serializable {

    /** 版本号 */
    private static final long serialVersionUID = ${tableInfo.serialVersionUID}L;
    <#--${tableInfo.serialVersionUID}-->
    <#--/** id */-->
    <#--@Id-->
    <#--@Column(name = "ID", unique = true, nullable = false, length = 10)-->
    <#--private Integer id;-->
<#list tableInfo.fieldInfos as fieldInfo>
<#---->
<#--//${fieldInfo}-->
    <#if fieldInfo.remark?? >
    /** ${fieldInfo.remark}*/
    </#if>
    <#if fieldInfo.primaryKey >
    @Id
    </#if>
    @Column(name="${fieldInfo.colName}" , <#if fieldInfo.unique > unique = ${fieldInfo.unique},</#if> nullable = ${fieldInfo.nullable} ,length = ${fieldInfo.columnSize?c})
    /**${fieldInfo.javaType}  <#if fieldInfo.javaType=='Timestamp' > Date </#if> <#if fieldInfo.javaType=='Byte[]' > Boolean </#if>
        <#if fieldInfo.javaType!='Timestamp' &&  fieldInfo.javaType!='Byte[]' > ${fieldInfo.javaType} </#if>
     */
    private  <#if fieldInfo.javaType=='Timestamp' > Date </#if> <#if fieldInfo.javaType=='Byte[]' > Boolean </#if>        <#if fieldInfo.javaType!='Timestamp' &&  fieldInfo.javaType!='Byte[]' > ${fieldInfo.javaType} </#if> ${fieldInfo.proName};
</#list>

}